/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.tradeplus.admin;

import com.tradeplus.admin.service.AdminDeskService;
import com.tradeplus.admin.service.AdminGroupService;
import com.tradeplus.admin.service.AdminPrivilegeService;
import com.tradeplus.admin.service.AdminService;
import com.tradeplus.admin.service.AdminUserService;
import com.tradeplus.admin.service.KernalService;
import com.tradeplus.admin.service.PreferenceService;
import com.tradeplus.admin.service.ProfileService;
import com.tradeplus.util.TPLController;
import java.util.HashMap;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.servlet.ModelAndView;

/**
 *
 * @author ronnie
 */
public class AdminController extends TPLController {
    
    private AdminService adminService;
    private AdminUserService adminUserService;
    private AdminDeskService adminDeskService;
    private AdminGroupService adminGroupService;
    private AdminPrivilegeService adminPrivilegeService;
    private KernalService kernalService;
    private PreferenceService preferenceService;
    private ProfileService profileService;

    public void setAdminDeskService(AdminDeskService adminDeskService) {
        this.adminDeskService = adminDeskService;
    }

    public void setAdminGroupService(AdminGroupService adminGroupService) {
        this.adminGroupService = adminGroupService;
    }

    public void setAdminPrivilegeService(AdminPrivilegeService adminPrivilegeService) {
        this.adminPrivilegeService = adminPrivilegeService;
    }

    public void setAdminService(AdminService adminService) {
        this.adminService = adminService;
    }

    public void setAdminUserService(AdminUserService adminUserService) {
        this.adminUserService = adminUserService;
    }

    public void setKernalService(KernalService kernalService) {
        this.kernalService = kernalService;
    }

    public void setPreferenceService(PreferenceService preferenceService) {
        this.preferenceService = preferenceService;
    }

    public void setProfileService(ProfileService profileService) {
        this.profileService = profileService;
    }
    
    /**
     * Admin Login View open
     * 
     * @param request
     * @param response
     * @return
     * @throws Exception 
     */
    public ModelAndView AdminLogin(HttpServletRequest request, HttpServletResponse response) throws Exception {
        return new ModelAndView("/admin/login",new HashMap());
    }
    
    /**
     * Load Admin Profile to view in JavaScript
     * 
     * @param request
     * @param response
     * @return
     * @throws Exception 
     */
    public ModelAndView LoadAdminProfile(HttpServletRequest request, HttpServletResponse response) throws Exception {
        
        return new ModelAndView("/admin/desk",new HashMap());
    }
}
